# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname=thin-provisioning-tools
pkgver=1.0.12
pkgrel=0
pkgdesc="suite of tools for manipulating the metadata of the dm-thin device-mapper target"
url="https://github.com/jthornber/thin-provisioning-tools"
# ucontext libc fs_type_t
arch="all"
license="GPL-3.0-only"
makedepends="cargo gawk cargo-auditable"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jthornber/thin-provisioning-tools/archive/v$pkgver.tar.gz"
# tests do a ton of disk i/o for a while..
# they pass on x86_64, but a bit too destructive to constantly run
options="net !check"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --locked
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
2e960e5a0d11016c1131ed48678a44c54164b43811f8efaa7172d9df7f433b185fa4b2f8d3d430affff19ced672f74a1f17614efd00287f2c310a6a3745ff8e5  thin-provisioning-tools-1.0.12.tar.gz
"
